package com.example.administrator.testdagger.countdown;

import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;

import com.example.administrator.testdagger.R;

/**
 * Description: 
 * ModelName:
 *
 * @author WangJQ
 *Create at:  2018/6/2 9:39
 * Company: 沈阳艾尔时代科技发展有限公司
 * Copyright: (c)2018 AIR Times Inc. All rights reserved.
 * @version 1.0
 */

public class RecyListAty extends AppCompatActivity {
    ProgressAdapter2 adapter;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rcv);
        RecyclerView mRcv = (RecyclerView) findViewById(R.id.rcv);
        mRcv.setLayoutManager(new LinearLayoutManager(this));
        adapter = new ProgressAdapter2(this);
        mRcv.setAdapter(adapter);
        timer.start();
    }

    CountDownTimer timer = new CountDownTimer(2000000,1000) {
        @Override
        public void onTick(long millisUntilFinished) {
            Log.d("WJQ","onTick");
            adapter.notifyDataSetChanged();
        }

        @Override
        public void onFinish() {

        }
    };
}
